package com.wu.aop;

import org.aspectj.lang.annotation.After;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Before;
import org.springframework.stereotype.Component;

/**
 * @author wuyanshen
 * @date 2019-01-21 1:17 PM
 * @discription 描述
 */
@Aspect
@Component
public class MyAop {


    @Before("execution(* com.wu.service.UserService.getUser(..))")
    public void before() {
        System.out.println("我是前置通知");
    }

    @After("execution(* com.wu.service.UserService.getUser(..))")
    public void after() {
        System.out.println("我是后置通知");
    }
}
